package org.foj.service.impl;

import org.appfuse.service.impl.GenericManagerImpl;
import org.foj.dao.CommentDao;
import org.foj.model.Comment;
import org.foj.service.CommentManager;

import javax.jws.WebService;
import java.util.List;

/**
 * @author jeremy anderson
 */
@WebService(serviceName = "CommentService", endpointInterface = "org.foj.service.CommentManager")
public class CommentManagerImpl extends GenericManagerImpl<Comment, Long> implements CommentManager {

  private CommentDao commentDao;

  public CommentManagerImpl(CommentDao commentDao) {
    super(commentDao);
    this.commentDao = commentDao;
  }

  @Override
  public List<Comment> findCommentsByIssueId(Long issueId) {
    return commentDao.getCommentsByIssueId(issueId);
  }
}
